home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / borland / svgabg52.zip / SVGAS3.INC < prev    next >
Text File  |  1992-06-25  |  1KB  |  45 lines

  1. (************************************************)
  2. (*                         *)
  3. (*      SuperVGA S3 BGI driver defines    *)
  4. (*        Copyright (c) 1992        *)
  5. (*        Jordan Hargraphix Software        *)
  6. (*                        *)
  7. (************************************************)
  8.  
  9. (* These are the currently supported modes *)
  10. const
  11.   SVGAS3_640x480x256    = 0;
  12.   SVGAS3_800x600x256    = 1;
  13.   SVGAS3_1024x768x256     = 2;
  14.   SVGAS3_800x600x16    = 3;
  15.   SVGAS3_1024x768x16    = 4;
  16.   SVGAS3_1280x960x16    = 5;
  17.   SVGAS3_1280x1024x16    = 6;
  18.   SVGAS3_640x480x32768    = 7;
  19.  
  20. function RGB(R,G,B : Word) : Word;
  21. begin
  22.   RGB := ((R and 31)SHL 10) OR ((G and 31)SHL 5) OR (B and 31);
  23. end;
  24.  
  25. function RealDrawColor(Color : Word) : Word;
  26. begin
  27.   if (GetMaxColor > 256) then
  28.     SetRgbPalette(1024,(Color SHR 10) AND 31,(Color SHR 5) AND 31,Color AND 31);
  29.   RealDrawColor := Color;
  30. end;
  31.  
  32. function RealFillColor(Color : Word) : Word;
  33. begin
  34.   if (GetMaxColor > 256) then
  35.     SetRgbPalette(1025,(Color SHR 10) AND 31,(Color SHR 5)AND 31,Color AND 31);
  36.   RealFillColor := Color;
  37. end;
  38.  
  39. function RealColor(Color : Word) : Word;
  40. begin
  41.   if (GetMaxColor > 256) then
  42.     SetRgbPalette(1026,(Color SHR 10) AND 31,(Color SHR 5)AND 31,Color AND 31);
  43.   RealColor := Color;
  44. end;
  45.